All Questions
Tagged with architecturejava
205 questions
6votes
3answers
652views
Hexagonal Architecture + Domain Driven Design. How to perform a correct implementation?
Currently, I am trying to implement these two architectures together with Java and Spring (although technology shouldn't matter I think). But I'm encountering problems getting them to work together. I ...
1vote
4answers
413views
Preventing payment to be processed twice
I have app with paymemt/subscription service, pretty much how the payment works is: Initial payment User initiate payment on the web ( click on "subscribe") Back-End send init request to ...
1vote
1answer
149views
Background thread processing vs queue based processing for relatively short tasks (max 30-40 seconds)
I need suggestion / recommendation on the design approaches mentioned below. UseCase: I have a usecase where a client uses my system to generate some recommendations. Now, these recommendations are ...
0votes
2answers
221views
Where perform mapping in strict Domain-Driven Design?
I want to create an example application where we use a strict domain-driven design and layering (controller, service, repository). Most notably, we have a clear distinction between the domain and the ...
11votes
7answers
5kviews
How to maintain dependencies shared among microservices?
There is a dependency jar containing tons of service classes mostly used to retrieve data from database, and this jar is used among several different micro services in one cluster. There is a big ...
0votes
0answers
117views
Spring data exchange between components?
Please advise me what pattern to use in following case: I have a Java/Spring Boot application. There is a component with @KafkaListener method which receives Kafka Messages on CRUD of various subject ...
-1votes
1answer
458views
Using a shared enum across 15 nanoservices [closed]
Originally posted here, moved to code review, redirected from code review back here as there is no code to review. I think the question is enough abstract to be asked here. I have a mono repo with ...
1vote
1answer
566views
The recommended Spring Boot project structure leads to repetitive code
When implementing projects in Spring Boot (especially CRUD applications), I often find myself writing a lot of repetitive code that just calls functions and services from lower layers. For example, ...
0votes
1answer
240views
Is it secured to accept and execute user provided CURL commands
Assume you have to figure out a dynamic way where the user can provide an API call to hit in the backend for example, user to provide a webhook to call on his end server So, An idea for users to ...
1vote
1answer
354views
Extract common code into own module
I'm finding myself in a situation where I need to define common behaviour and implement it depending on the environment (minecraft server or javafx runtime). The simple graph below describes my idea. ...
0votes
2answers
949views
Is MVC a sensible design choice for a CLI application?
I am working on a CLI chess game that only involves 2 human players, I decided to make it follow the MVC architecture to ensure separation of concern and to make the possibility of a GUI/web ...
0votes
2answers
745views
Microservices - create post for logged in user
I am working on a small project with microservices architecture in Spring Boot. As to not make unnecessary calls to users-microservice, I have duplicated some necessary User data (id, name, summary, ...
-2votes
1answer
618views
Best way of handling concurrent requests
I am working on an Authentication system (java based) that will authenticate users and create a session for them. This session is valid for 5 hours. I do not want the same user to have multiple ...
0votes
1answer
69views
Design a non replayable endpoint for a service
I am trying something out in Springboot and stuck with a weird issue where I want to send some data from my frontend (react app) to backend (SpringBoot) and make that request non replay able by users (...
6votes
3answers
3kviews
In vertical slice architecture, how can I deal with entities/repositories that are used in multiple slices?
I'm trying to group the components of my system by funtionality. This is the analysis class diagram of my system model. A service class that involves a Post entity might necessarily interact ...